package com.moter.one.wyydemo1.backstage.vo;

/**
 * 目前用于分页
 * @param <T>
 */
public class DataVo<T> {
    private T data;//返回数据
    private String msg;//返回的信息
    private Integer code;//返回的状态码
    private Integer count;//数据库数据总量
    public DataVo(Integer code, String msg, T data ,Integer count) {
        this.data = data;
        this.msg = msg;
        this.code = code;
        this.count=count;
    }

    public DataVo() {
    }

    public DataVo(Integer code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return "DataVo{" +
                "data=" + data +
                ", msg='" + msg + '\'' +
                ", code=" + code +
                ", count=" + count +
                '}';
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
